package com.wicket.okrframework.integration.dto;

import com.wicket.okrframework.common.dto.BaseDto;
import com.wicket.okrframework.integration.dto.TributPowerDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import lombok.Data;

@Data
public class FrameworkSceneRoleDto extends BaseDto implements Serializable {

  @ApiModelProperty("角色列表")
  private List<FrameworkSceneRoleDto> roleList = new ArrayList<>();

  @ApiModelProperty("权限分配列表")
  private List<TributPowerDto> tributPowerList = new ArrayList<>();

  /**
   * 角色ID:
   */
  @ApiModelProperty("角色ID")
  private String roleId;

  /**
   * 角色标识:
   */
  @ApiModelProperty("角色标识")
  private String roleCode;

  /**
   * 角色名称:
   */
  @ApiModelProperty("角色名称")
  private String roleName;

  /**
   * 角色图标:
   */
  @ApiModelProperty("角色图标")
  private String roleLogo;

  /**
   * 宿主类型ID:
   */
  @ApiModelProperty("宿主类型ID")
  private String hostTypeId;

  /**
   * 角色类型:
   */
  @ApiModelProperty("角色类型")
  private String roleType;

  /**
   * 是否身份角色:
   */
  @ApiModelProperty("是否身份角色")
  private String isIdentity;

  /**
   * 主体生命周期:
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 操作人就职记录ID:
   */
  @ApiModelProperty("操作人就职记录ID")
  private String operationInductionId;

  /**
   * 操作时间:
   */
  @ApiModelProperty("操作时间")
  private Date operateTime;

  /**
   * 角色介绍:
   */
  @ApiModelProperty("角色介绍")
  private String roleRemark;

  /**
   * 是否推荐 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否推荐")
  private String isRecommend;

  /**
   * 个人账号ID
   */
  @ApiModelProperty("个人账号ID")
  private String userId;

  /**
   * 真实头像
   */
  @ApiModelProperty("真实头像")
  private String userFace;

  /**
   * 真实姓名
   */
  @ApiModelProperty("真实姓名")
  private String idCardName;

  /**
   * 用户昵称
   */
  @ApiModelProperty("用户昵称")
  private String nickName;

  /**
   * 是否平台数据 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否平台数据")
  private String platformData;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    FrameworkSceneRoleDto that = (FrameworkSceneRoleDto) o;
    return (
      roleId == that.roleId &&
      roleCode == that.roleCode &&
      roleName == that.roleName &&
      roleLogo == that.roleLogo &&
      hostTypeId == that.hostTypeId &&
      roleType == that.roleType &&
      isIdentity == that.isIdentity &&
      subjectLifeCycle == that.subjectLifeCycle &&
      operationInductionId == that.operationInductionId &&
      operateTime == that.operateTime &&
      roleRemark == that.roleRemark &&
      isRecommend == that.isRecommend &&
      userId == that.userId &&
      userFace == that.userFace &&
      idCardName == that.idCardName &&
      nickName == that.nickName &&
      platformData == that.platformData
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      roleId,
      roleCode,
      roleName,
      roleLogo,
      hostTypeId,
      roleType,
      isIdentity,
      subjectLifeCycle,
      operationInductionId,
      operateTime,
      roleRemark,
      isRecommend,
      userId,
      userFace,
      idCardName,
      nickName,
      platformData
    );
  }
}
